<?php

namespace Modules\Shop\View\Components;

use Livewire\Component;
use Modules\Shop\Models\Spec;

class SpecTool extends Component
{

    public $specOptions = [];
    protected $listeners = ['specUpdate'];

    public function __construct($id)
    {
        parent::__construct($id);

        $this->specUpdate();
    }

    public function specUpdate()
    {
        $this->specOptions = Spec::getOptions();
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\View\View|string
     */
    public function render()
    {
        return view('shop::livewire.spectool');
    }
}
